<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style>


.a {
	/* border: 8px red solid; */
	width: 100px;
	height: 200px;
	margin: 200px auto;
	position: relative;
	animation: xin 6s infinite linear;
	transform-style: preserve-3d;
/* 	position: absolute; */
	/* transform: rotateY(168deg); */
}

.a:BEFORE, .a:AFTER {
	content: "";
	border: 2px red solid;
	width: 100px;
	height: 200px;
	border-radius: 50% 50% 0 0;
	position: absolute;
	background-color: white;
}

.a:BEFORE {
	transform: rotate(-45deg);
	left: -40px;
	border-right:none;
}

.a:AFTER {
	transform: rotate(45deg);
	left: 32px;
	border-left:none;
}
.b {
	/* border: 8px blue solid; */
	width: 100px;
	height: 200px;
	margin: 0 auto;
	position: relative;
	animation: xin1 4s infinite linear;
	transform-style: preserve-3d;
	/* position: absolute; */
	top:-400px;
	left:1px;
	/* 	transform: rotateY(-168deg); */
}

.b:BEFORE, .b:AFTER {
	content: "";
	border: 2px blue solid;
	width: 100px;
	height: 200px;
	border-radius: 50% 50% 0 0;
	position: absolute;
	background-color: white;
}

.b:BEFORE {
	transform: rotate(-45deg);
	left: -40px;
	border-right:none;
}

.b:AFTER {
	transform: rotate(45deg);
	left: 32px;
	border-left:none;
}
@keyframes xin {from { transform:rotateY(0deg)
	
}

to {
	transform: rotateY(360deg)
}
}
@keyframes xin1 {from { transform:rotateY(0deg)
	
}

to {
	transform: rotateY(360deg)
}
}

</style>
</head>
<body>

		<div class="a"></div>
<div class="b"></div>
	

</body>
</html>